using System;
using System.Collections.Generic;
using System.Text;

namespace SEAM.Data
{
    /// <summary>
    /// Defines a class for InvalidReturnCodeExcption
    /// 
    /// <remarks>
    /// This class provides detailed information on any exceptions that
    /// are generated while trying to utilize DataAccess capabilities.
    /// </remarks>
    /// 
    /// </summary>
    public class InvalidReturnCodeExcption : DataAccessException
    {
        protected static string GetFormattedMessage(string strSource, ReturnCode RetCode)
        {
            return "Invalid ReturnCode << " + RetCode + " >> from " + strSource;
        }

        public InvalidReturnCodeExcption(string strSource, ReturnCode RetCode)
            : this(GetFormattedMessage(strSource, RetCode))
        {
        }

        public InvalidReturnCodeExcption(string strSource, ReturnCode RetCode, DataAccessParam[] arrParams)
            : this(GetFormattedMessage(strSource, RetCode), arrParams)
        {
        }

        public InvalidReturnCodeExcption(string strSource, ReturnCode RetCode, DataAccessParam[] arrParams, Exception innerException)
            : this(GetFormattedMessage(strSource, RetCode), arrParams, innerException)
        {
        }

        public InvalidReturnCodeExcption(string strMessage)
            : base(strMessage, null)
        {
        }

        public InvalidReturnCodeExcption(string strMessage, DataAccessParam[] arrParams)
            : base(strMessage, null, arrParams, null)
        {
        }

        public InvalidReturnCodeExcption(string strMessage, DataAccessParam[] arrParams, Exception innerException)
            : base(strMessage, null, arrParams, innerException)
        {
        }
    }
}
